# Maintainer: metab0t <metab0t@outlook.com>

_realname=chicken
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=5.3.0
pkgrel=2
pkgdesc='Feature rich R5RS Scheme compiler and interpreter (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://call-cc.org/'
license=('BSD')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
source=("https://code.call-cc.org/releases/$pkgver/${_realname}-$pkgver.tar.gz")
sha256sums=('c3ad99d8f9e17ed810912ef981ac3b0c2e2f46fb0ecc033b5c3b6dca1bdb0d76')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make -j1 PLATFORM=mingw-msys PREFIX="${MINGW_PREFIX}"
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make -j1 PLATFORM=mingw-msys DESTDIR="${pkgdir}" PREFIX="${MINGW_PREFIX}" install
  install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
